public class App {
    public static void main(String[] args) throws Exception {
        Clerk clerk=new Clerk();
        Productor productor=new Productor(clerk);
        Customer customer=new Customer(clerk);
        Thread customThread1=new Thread(customer);
        Thread customThread2=new Thread(customer);
        Thread customThread3=new Thread(customer);
        Thread productorThread=new Thread(productor);
        customThread1.setName("消费者1");
        customThread2.setName("消费者2");
        customThread3.setName("消费者3");
        productorThread.setName("生产者");
        customThread1.start();
        customThread2.start();
        customThread3.start();
        productorThread.start();
    }
}
